/*
@author Aurelien Deharbe

This file is part of Cute-Client.

Cute-Client is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Cute-Client is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with Cute-Client.  If not, see <http://www.gnu.org/licenses/>.
*/

package com.cuteserver.client.examples;

import com.cuteserver.client.CSClient;
import com.cuteserver.client.CSException;
import com.cuteserver.client.CSSession;

public class Example01 {

	public static void main(String[] args)
	{
		try {
			CSClient c = new CSClient("localhost", 5000);
			CSSession s = c.newSession("example01");
			
			String hello = s.qss("QPushButton('Hello world!')");
			s.qs(hello + ".resize(100, 30)");
			s.qs(hello + ".show()");
			
			s.mainloop();
		}
		catch(CSException e) {
			e.print();
		}
	}
}
